ci: Add a macos build
authorMatthias Clasen <mclasen@redhat.com>
Sun, 3 Jan 2021 03:34:52 +0000 (22:34 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 4 Jan 2021 02:34:04 +0000 (21:34 -0500)
Most of this is cribbed from glib.

We don't use COMMON_MESON_FLAGS here, since disabling
-Werror one subproject at a time is too painful for
all the promoted sub-sub-projects. This needs a better
solution in meson.

Since this is a full rebuild of the entire stack, limit
this to master and merge requests.

.gitlab-ci.yml
.gitlab-ci/show-execution-environment.sh [new file with mode: 0755]
meson.build

index 18565b29131858cb0d0b7db80b5938309d089b28..ed714f4668bf71fb00fc32f95afcfd53a39ce308 100644 (file)
@@ -144,6 +144,26 @@ msys2-mingw64:
     MSYSTEM: "MINGW64"
     CHERE_INVOKING: "yes"
 
+macos:
+  stage: build
+  tags:
+    - macos
+  needs: []
+  before_script:
+    - bash .gitlab-ci/show-execution-environment.sh
+    - pip3 install --user meson==0.56
+    - pip3 install --user ninja
+    - export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
+  script:
+    - meson -Dx11-backend=false
+            -Dintrospection=disabled
+            _build
+    - ninja -C _build
+  artifacts:
+    when: always
+    paths:
+      - "${CI_PROJECT_DIR}/_build/meson-logs"
+
 .flatpak-defaults:
   image: $FLATPAK_IMAGE
   stage: flatpak
diff --git a/.gitlab-ci/show-execution-environment.sh b/.gitlab-ci/show-execution-environment.sh
new file mode 100755 (executable)
index 0000000..cc1bfdb
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -eux -o pipefail
+
+xcodebuild -version || :
+xcodebuild -showsdks || :
+
+system_profiler SPSoftwareDataType || :
index 60e7729a8e4f1366068c5d75b3ce18bc8143ff12..e8d6841116ab4d02797c4d7e2127f97b29d4844f 100644 (file)
@@ -381,8 +381,14 @@ epoxy_dep      = dependency('epoxy', version: epoxy_req,
 harfbuzz_dep   = dependency('harfbuzz', version: '>= 0.9', required: false,
                             fallback: ['harfbuzz', 'libharfbuzz_dep'])
 xkbdep         = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
-graphene_dep   = dependency('graphene-gobject-1.0', version: graphene_req,
-                            fallback: ['graphene', 'graphene_dep'])
+if os_darwin
+  graphene_dep   = dependency('graphene-gobject-1.0', version: graphene_req,
+                              fallback: ['graphene', 'graphene_dep'],
+                              default_options: ['introspection=false'])
+else
+  graphene_dep   = dependency('graphene-gobject-1.0', version: graphene_req,
+                              fallback: ['graphene', 'graphene_dep'])
+endif
 iso_codes_dep  = dependency('iso-codes', required: false)
 
 gtk_doc_dep    = dependency('gtk-doc', version: '>=1.33',